#!/bin/bash
if [ -e moo2.sh ]
then
echo "File $(pwd)/moo2.sh already exist, doing nothing"
else
cat << 'EOF'|head -c -1 > "moo2.sh"
#!/bin/bash
if [ -e moo1.sh ]
then
echo "File $(pwd)/moo1.sh already exist, doing nothing"
else
cat << 'EOF'|head -c -1 > "moo1.sh"
#!/bin/bash
if [ -e moo ]
then
echo "File $(pwd)/moo already exist, doing nothing"
else
cat << 'EOF'|head -c -1 > "moo"
         (__) 
         (oo) 
   /------\/ 
  / |    ||   
 *  /\---/\ 
    ~~   ~~   
...."Have you mooed today?"...

EOF
echo -ne "
EOF" >> "moo2.sh"
cat << 'EOF'|head -c -1 >> "moo2.sh"

echo -ne "
EOF
echo -ne "
EOF" >> "moo2.sh"
cat << 'EOF'|head -c -1 >> "moo2.sh"
" >> "moo1.sh"
cat << 'EOF'|head -c -1 >> "moo1.sh"

echo "$(pwd)/moo"
fi

echo "Done."

EOF
echo -ne "
EOF" >> "moo2.sh"
cat << 'EOF'|head -c -1 >> "moo2.sh"

echo "$(pwd)/moo1.sh"
fi

echo "Done."

EOF
echo "$(pwd)/moo2.sh"
fi

echo "Done."
